package com.feri.fc.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 千锋Java,为你而生！
 *
 * @Author: Feri
 * @Date:2024/11/27 13:54
 * @Modified:
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageData<T> {
    private Integer code;
    private String msg;
    private Long total;
    private Long pages;
    private List<T> data;

    /**
     * 分页查询成功
     * */
    public static <T> PageData<T> ok(Long total,Long pages,List<T> data){
        return new PageData<>(0,"操作成功",total,pages,data);
    }
}
